#ifndef _main__h
#define __main_h
//HAL--------------------



//Const--------------------
//base 4ms
#define D_1s         250   //1s
#define D_40ms       10    //40ms
#define D_300ms   50 //300ms
#define D_500ms      125     //500ms
 #define D_1m        60

 

 
//Var----------------------
#ifdef  MAIN_C
uint8_t  timer40ms;
uint8_t timer1m;
uint8_t timer1s;
uint8_t  timer500ms;
uint8_t timer300ms;
uint8_t startTime;
uint8_t setCurTemp;
bit bSecFlash500ms;
bit bUpdateCurTemp;
bit bError;
bit bError1;
bit bError2;
bit bError3;
bit bAdShort;
bit bAdOffBuzz;
uint8_t adShortNum;
bit bAdShortBuzz;
uint8_t adOffBuzzNum;
uint8_t adShortBuzzNum;
bit bHigTemp;
uint8_t timer300ms;
bit bPowerOnOff;
uint8_t number;
uint8_t lastFlashSetTemptime;
uint8_t setTemp;
bit bSetTemp;
uint8_t flashSetTemptime;
uint8_t lastBError;
bit bSaveTemp;
uint8_t cycleNum;
uint8_t	errorNum;
#else
extern	uint8_t cycleNum;
extern uint8_t	errorNum;
extern bit bSaveTemp;
extern uint8_t lastBError;
extern uint8_t setTemp;
extern bit bSetTemp;
extern uint8_t flashSetTemptime;
extern uint8_t lastFlashSetTemptime;
extern bit bPowerOnOff;
extern uint8_t number;
extern bit bError3;
extern uint8_t  timer40ms;
extern uint8_t timer1m;
extern uint8_t timer300ms;
extern uint8_t timer1s;
extern uint8_t  timer500ms;
extern uint8_t startTime;
extern uint8_t setCurTemp;
extern bit bSecFlash500ms;
extern bit bUpdateCurTemp;
extern bit bError;
extern bit bError1;
extern bit bError2;
extern bit bAdShort;
extern bit bAdOffBuzz;
extern uint8_t adShortNum;
extern bit bAdShortBuzz;
extern uint8_t adOffBuzzNum;
extern uint8_t adShortBuzzNum;
extern bit bHigTemp;
extern uint8_t timer300ms;
#endif


//Function----------------------
void PowerSet();
void Error();
void timerControl();
void PowerOff();
#endif